package org.jeecg.entity.meter;

import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;

/**
 * @Description: 手抄表
 * @Author: jeecg-boot
 * @Date:   2021-01-17
 * @Version: V1.0
 */
@Data
@TableName("meter_hand_read")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="meter_hand_read对象", description="手抄表")

public class MeterHandRead {
    
	/**金额*/
	@Excel(name = "金额", width = 15)
    @ApiModelProperty(value = "金额")
	private java.math.BigDecimal amount;
	/**生成账单状态(0：未生成 1:已生成)*/
    @ApiModelProperty(value = "生成账单状态(0：未生成 1:已生成)")
	private Integer billsStatus;

	@Excel(name = "账单生成状态", width = 15)
	@TableField(exist = false)
	private String billsStatusStr;

	/**抄表涵盖日期*/
	@Excel(name = "抄表涵盖日期", width = 15)
    @ApiModelProperty(value = "抄表涵盖日期")
	private String coverDate;
	/**抄表涵盖截止日期*/
	@Excel(name = "抄表涵盖截止日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "抄表涵盖截止日期")
	private Date coverEndDate;
	/**抄表涵盖起始日期*/
	@Excel(name = "抄表涵盖起始日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "抄表涵盖起始日期")
	private Date coverStartDate;
	/**createBy*/
	@Excel(name = "createBy", width = 15)
    @ApiModelProperty(value = "createBy")
	private String createBy;
	/**createTime*/
	@Excel(name = "createTime", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "createTime")
	private Date createTime;
	/**delFlag*/
	@Excel(name = "delFlag", width = 15)
    @ApiModelProperty(value = "delFlag")
	private Integer delFlag;
	/**收费项ID*/
	@Excel(name = "收费项ID", width = 15)
    @ApiModelProperty(value = "收费项ID")
	@Dict(dicCode ="id" ,dictTable ="charge_feeitem" ,dicText = "fee_name")
	private String feeId;
	/**id*/
	@TableId(type = IdType.UUID)
    @ApiModelProperty(value = "id")
	private String id;
	/**本次读数*/
	@Excel(name = "本次读数", width = 15)
    @ApiModelProperty(value = "本次读数")
	private String newRead;
	/**上次读数*/
	@Excel(name = "上次读数", width = 15)
    @ApiModelProperty(value = "上次读数")
	private String preRead;
	/**单价*/
	@Excel(name = "单价", width = 15)
    @ApiModelProperty(value = "单价")
	private java.math.BigDecimal price;
	/**projectId*/
	@Excel(name = "projectId", width = 15)
    @ApiModelProperty(value = "projectId")
	private String projectId;
	/**计量月，格式为yyyy-MM*/
	@Excel(name = "抄表月份", width = 15)
    @ApiModelProperty(value = "计量月")
	private String readMonth;
	/**房间id*/
	@Excel(name = "房间id", width = 15)
    @ApiModelProperty(value = "房间id")
	private String roomId;
	/**tenantId*/
	@Excel(name = "tenantId", width = 15)
    @ApiModelProperty(value = "tenantId")
	private String tenantId;
	/**updateBy*/
	@Excel(name = "updateBy", width = 15)
    @ApiModelProperty(value = "updateBy")
	private String updateBy;
	/**updateTime*/
	@Excel(name = "updateTime", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "updateTime")
	private Date updateTime;
	/**用量*/
	@Excel(name = "用量", width = 15)
    @ApiModelProperty(value = "用量")
	private java.math.BigDecimal used;
	@Excel(name = "项目名称", width = 15)
	@TableField(exist = false)
	private String projectName;
	@Excel(name = "楼宇", width = 15)
	@TableField(exist = false)
	private String floorName;
	@Excel(name = "房间", width = 15)
	@TableField(exist = false)
	private String roomName;
	@Excel(name = "地址", width = 15)
	@TableField(exist = false)
	private String address;
	@TableField(exist = false)
	@Excel(name = "收费项编号", width = 15)
	private String feeCode;
	@TableField(exist = false)
	@Excel(name = "收费项名称", width = 15)
	private String feeCodeName;
	@ApiModelProperty(value = "是否已录入之后月份的读数")
	@TableField(exist = false)
	private Integer hasNext;
	@ApiModelProperty(value = "校验状态 0:正常  1:异常")
	private Integer validationStatus;


	public String getBillsStatusStr() {
		if (this.billsStatus != null && this.billsStatus == 1){
			this.billsStatusStr = "已生成";
		} else{
			this.billsStatusStr = "未生成";
		}
		return billsStatusStr;
	}
}
